Wiki

Clone wiki

MIST / Installing MIST

This section details the steps required to install MIST.

Page Table of Contents

Installation

In this section you will find instructions for obtaining and using the MIST library. To use MIST you will need to do the following:

  • Obtain the MIST sources from the Git repository (or download a release tarball)
  • Patch the application you wish to use the MIST library with
  • Compile the MIST library
  • Compile your application and link with the MIST library
  • Run the application using integrators provided by MIST

Getting started

Getting started with Bitbucket: If you are new to Bitbucket and Git, there are some simple instructions for getting started here: Bitbucket 101.

You will need to set up Git on your computer/HPC where you wish to pull the source code to: Set Up Git.

You can check whether Git is installed by typing in the command line:

which git
If you are on a system such as ARCHER make sure you have the latest version of git by doing:
module load git

Cloning the Repository

Once you have Git on your chosen system, the next step is to clone the MIST repository to your local system:

  1. Go to the MIST Overview page in Bitbucket.

  2. Mouse over the "..." at the top left of the page and click "Clone"

  3. Copy the pop-up clone dialogue message (something like git clone https://username@bitbucket.org/extasy-project/mist.git).

  4. Paste the copied message into the terminal.

This will create a clone of the repository (in the directory mist) in your chosen location.

The Mist source code is located in the subdirectory:

mist/mist

Configuring MIST for use with an MD Application

You only need to patch the application once even if you make further changes to the MIST library code. Only MIST will need to be recompiled if MIST is changed, and the host MD application must be relinked.

The following uses GROMACS as an example, but similar steps are required for each application. Details are provided within the MIST README file: Download and unpack source of gromacs-5.0.2.tar.gz from the GROMACS downloads site:

#!unix
        wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-5.0.2.tar.gz
        tar -xzvf gromacs-5.0.2.tar.gz 
Configure the MIST package to build with GROMACS (additional configuration options are available, run ./configure --help for details).

#!unix
    ./configure --with-gromacs=/path/to/gromacs-5.0.2

If successful, the configure script will output a series of steps required to complete the build. Follow these carefully, as described below:

#!unix
    cd mist
    make patch
This will create a patch for GROMACS in your mist patch directory:
#!unix
    export GROMACS_PATH=/path/to/gromacs-5.0.2
* Patch GROMACS with MIST changes:
#!unix
    cd $GROMACS_PATH
    patch -p0 < /path/to/mist/mist/patches/GROMACS-5.0.2.patch

Compiling the MIST Library

The MIST library is compiled from the source directory (cd /path/to/mist/mist) for a particular application using the command:

make lib

This builds MIST such that it is ready for use with the appropriate application.

Note that the MIST library (libmist.a) that you have built will work only with the specified application you have configured for. If you later want to build MIST for use with another code, re-run configure, specifying the path to the code you wish to patch, then rebuild the library.

Building GROMACS (on ARCHER)

Specific instructions are provided for building GROMACS with MIST support on ARCHER.

To set up your environment for the serial build switch to the GNU programming environment, with a recent version of the compiler:

#!unix
    module swap PrgEnv-cray PrgEnv-gnu
    module swap gcc gcc/6.1.0

and load the FFTW 3 and CMake modules:

#!unix
    module add fftw/3.3.4.9
    module add cmake

Configure MIST, patch GROMACS and build the MIST library:

#!unix
    cd mist
    autoreconf -i
    ./configure --with-gromacs=/path/to/gromacs
    export MIST_ROOT=/path/to/mist
    cd $MIST_ROOT/mist
    make patch
    export GROMACS_PATH=/path/to/gromacs/
    cd $GROMACS_PATH
    patch -p0 < $MIST_ROOT/mist/patches/GROMACS-5.0.2.patch
    cd $MIST_ROOT/mist
    make lib

Set up environment for GROMACS build:

#!unix
    export CXX=CC
    export CC=cc
    export CMAKE_PREFIX_PATH=$FFTW_DIR
    export FFTWF_INCLUDE_DIR=$FFTW_INC
    export FLAGS="-O3 -ftree-vectorize -funroll-loops -dynamic"
    export INSTALLDIR="/path/where/gromacs/will/be/installed" 
NB. The path to the FFTW libraries are obtained from environment variable set by the fftw module

Create a build directory and build GROMACS (MPI and OpenMP enabled):

#!unix
    cd $GROMACS_PATH
    mkdir build
    cd build
    cmake ../ -DGMX_MPI=ON -DGMX_OPENMP=ON -DGMX_GPU=OFF -DGMX_X11=OFF -DCMAKE_C_FLAGS="$FLAGS"\
              -DCMAKE_CXX_FLAGS="$FLAGS" -DGMX_BUILD_MDRUN_ONLY=OFF -DCMAKE_INSTALL_PREFIX="$INSTALLDIR"
You can append any other valid GROMACS arch-specific flags to the above compilation line. In particular, you might want to build the preprocessing tools (GMX_BUILD_MDRUN_ONLY=ON) as a serial build (GMX_MPI=OFF) so they can easily be run on a login node.

If the configuration is successful you should receive the message:

-- Build files have been written to: /path/to/install/directory

Then build GROMACS:

#!unix
    make
    make install

Up: Home; Previous: About; Next:Running LAMMPS with MIST

Updated